home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0074_Re: Delphi: Scrolling.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-24  |  798 b   |  22 lines

  1.  
  2. My response before was "Look into SendMessage, WM_VSCROLL and
  3. SB_PAGEDOWN".  I am happy to provide this code fragment in hopes that you
  4. really *did* look into my suggestion but couldn't figure out how to make it
  5. work.
  6.  
  7.  
  8. procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  9.   Shift: TShiftState);
  10. begin
  11.   if Key = VK_F8 then
  12.     SendMessage(Memo1.Handle,  { HWND of the Memo Control }
  13.                 WM_VSCROLL,    { Windows Message }
  14.                 SB_PAGEDOWN,   { Scroll Command }
  15.                 0)             { Not Used }
  16.   else if Key = VK_F7 then
  17.     SendMessage(Memo1.Handle,  { HWND of the Memo Control }
  18.                 WM_VSCROLL,    { Windows Message }
  19.                 SB_PAGEUP,     { Scroll Command }
  20.                 0);            { Not Used }
  21. end;
  22.